Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ephemeral: Initial ephemeral resource type implementation #1050

Merged
merged 36 commits into from
Oct 31, 2024

Conversation

austinvalle
Copy link
Member

@austinvalle austinvalle commented Oct 28, 2024

The next versions of the plugin protocol (5.7/6.7) include support for a new "ephemeral resource" type

This is an initial implementation of that support with:

  • New ephemeral package with all exported Go types for provider developers to implement ephemeral resources.
    • New ephemeral/schema package with matching attribute schema support to the other schema supporting concepts (data sources, provider, and managed resources)
  • Implementation of the ValidateEphemeralResourceConfig, OpenEphemeralResource, RenewEphemeralResource, and CloseEphemeralResource RPCs in the internal framework server, proto5/6 servers, and data handling between all layers
  • Addition of ephemeral resources into existing GetProviderSchema and GetMetadata RPCs

This functionality will be released as technical preview without compatibility promises until Terraform 1.10 is generally available. Go and website documentation include additional callouts about the compatibility of this functionality.

@austinvalle austinvalle added the enhancement New feature or request label Oct 28, 2024
@austinvalle austinvalle added the protocol Issues or pull requests that may require changes to the plugin protocol label Oct 28, 2024
@austinvalle austinvalle added this to the v1.13.0 milestone Oct 28, 2024
dependabot bot and others added 2 commits October 30, 2024 14:10
Bumps [github.com/hashicorp/terraform-plugin-go](https://github.com/hashicorp/terraform-plugin-go) from 0.24.0 to 0.25.0.
- [Release notes](https://github.com/hashicorp/terraform-plugin-go/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-go/blob/main/CHANGELOG.md)
- [Commits](hashicorp/terraform-plugin-go@v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Copy link
Contributor

@SBGoods SBGoods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments on documentation but otherwise LGTM!


Implement the `Close` method by:

1. [Accessing private data](/terraform/plugin/framework/resources/private-state#reading-private-state-data) from [`ephemeral.CloseRequest.Private` field](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework/ephemeral#CloseRequest.Private) needed to close the remote object.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we create a separate page for ephemeral resource private data instead of reusing the managed resource page? We can also just leave a todo for this and add it when ephemeral resources goes GA.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we should either make this page more generic and move it, or just duplicate it. I just opted to delay that for now since it gets the general information across. I think we can come back and adjust it later 👍🏻

austinvalle and others added 3 commits October 30, 2024 16:27
Co-authored-by: Selena Goods <selena.goods@hashicorp.com>
…figuration.mdx

Co-authored-by: Selena Goods <selena.goods@hashicorp.com>
@austinvalle austinvalle merged commit ae74f93 into main Oct 31, 2024
30 checks passed
@austinvalle austinvalle deleted the av/ephemeral-resources branch October 31, 2024 18:10
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request protocol Issues or pull requests that may require changes to the plugin protocol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants